<?php

function get_sql_cards_list(){	
	$filter['sort_by']    	= 	empty($_REQUEST['sort_by']) ? 'card_id' : trim($_REQUEST['sort_by']);
	$filter['sort_order'] 	= 	empty($_REQUEST['sort_order']) ? 'DESC' : trim($_REQUEST['sort_order']);
	/* 查询 */
	$sql = "SELECT card_id, card_name, card_img, card_fee, free_money, card_desc".
		   " FROM " . 'ybr_card' .
		   " ORDER by " . $filter['sort_by'] . ' ' . $filter['sort_order'];

 	return $sql;
}